package com.parking.mgr.useraccount.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.parking.mgr.useraccount.model.entity.BasicRoleEntity;
import com.parking.mgr.useraccount.model.param.BasicRoleParam;
import com.parking.mgr.useraccount.model.vo.BasicRoleVO;

import javax.servlet.http.HttpServletRequest;
import java.util.Collection;

/**
 * @ClassName BasicRoleService
 * @Description 角色功能service接口
 * @Auther shilintao
 * @Date 2023/5/23
 */
public interface BasicRoleService extends IService<BasicRoleEntity> {


    /**
     * 角色列表
     *
     * @param basicRoleParam 查询参数
     * @return
     */
    IPage<BasicRoleVO> list(BasicRoleParam basicRoleParam);

    /**
     * 角色列表(启用状态)
     *
     * @param basicRoleParam 查询参数
     * @return
     */
    IPage<BasicRoleVO> listEnable(BasicRoleParam basicRoleParam);

    /**
     * 添加角色
     *
     * @param basicRoleParam 添加参数
     */
    void add(BasicRoleParam basicRoleParam);

    /**
     * 删除角色
     *
     * @param ids
     */
    void delete(Collection<String> ids);

    /**
     * 编辑角色
     *
     * @param basicRoleParam
     */
    void edit(BasicRoleParam basicRoleParam);

    /**
     * 移动角色到不同的角色组
     *
     * @param currentId
     * @param currentGroupId
     * @param newGroupId
     */
    void move(String currentId, String currentGroupId, String newGroupId);

    String getRoleIdByName(String roleName);

    BasicRoleEntity getBasicRoleById(String id);

    BasicRoleEntity getOneByRequest(HttpServletRequest request);
}
